//
//  VRViewController.swift
//  NetWork
//
//  Created by Delin Meng 孟德林 on 2018/11/22.
//  Copyright © 2018 Delin Meng 孟德林. All rights reserved.
//

import UIKit
import CoreMotion
import GVRKit
import AVKit


class VRViewController: UIViewController {

//    let motionManager = CMMotionManager()

    let panoController = GVRRendererViewController()

    override func viewDidLoad() {
        super.viewDidLoad()

        configurePanoView()

    }

    func configurePanoView() {

        panoController.delegate = self
        let tap = panoController.rendererView.gestureRecognizers![0]
        tap.removeTarget(panoController.rendererView, action: Selector(("didTapGLView:")))
        tap.addTarget(self, action: #selector(didTapGLView(tapGesture:)))

        let pan = panoController.rendererView.gestureRecognizers![1]
        pan.removeTarget(panoController.rendererView, action: Selector(("didPanGLView:")))
        pan.addTarget(self, action: #selector(didPanGLView(panGesture:)))
        panoController.rendererView.frame =  view.bounds // interiorView.bounds


    }


    @objc func didTapGLView(tapGesture:UIPanGestureRecognizer) {






    }

    @objc func didPanGLView(panGesture:UIPanGestureRecognizer) {





    }





}

extension VRViewController : GVRRendererViewControllerDelegate,UIGestureRecognizerDelegate {








}
